feat(runtime): local workflow orchestration (closes #23)#57
Merged
Conversation
- Add runtime.WorkflowRunner + WorkflowRunOptions; local.Runtime loads project, applies Environment overrides (agents/policies), validates JSON + input schema before StartRun, runs engine, appends run.started/run.finished trace events - util.NewRunID via google/uuid - Export engine.ValidateWorkflowInput for preflight validation - Tests: SQLite run+trace, invalid JSON/schema skip persistence, env merge, auto run id Closes #23 Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements issue #23: MVP local runtime that loads YAML from a project root, applies Environment overrides, validates workflow input before persisting a run, then drives engine.Executor.
API
internal/runtimesocmdstays decoupled from wiring details.ProjectRoot+ state.RuntimeStore.project.LoadProject→ApplyEnvironment(agents + policies per design doc section 7.6) → parseInputJSON→engine.ValidateWorkflowInput→util.NewRunIDwhenRunIDempty →StartRun→run.startedtrace →Executor.Run→run.finishedtrace.Environment overrides (MVP)
model;constraintsmerged with non-zero / explicit flags (timeout, iterations, temperature, structured output).executionlimits merged (wall clock, cost ceiling, structured output flag).Unknown agent/policy names in an environment override return an error.
Engine change
StartRun(malformed JSON is rejected earlier in the local runner).Tests
demoworkflow (tool + mock agent) withEnvironmentName: staging; asserts succeeded run, trace includesrun.started/run.finished.runsrow.runsrow.timeoutSeconds= 99.RunIDomitted.Verification
make fmtmake vetmake test(-race)Follow-ups
agentctl run --projectto local.Runtime.Closes #23
Made with Cursor